package http;

import cn.hutool.http.HttpUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;

@Slf4j
public class HttpDemo {

    public static void main(String[] args) {

        String str = "1162322,1162322,1329904";

        String[] split = str.split(",");
        for (String s : split) {
            //可以单独传入http参数，这样参数会自动做URL编码，拼接在URL中
            HashMap<String, Object> paramMap = new HashMap<>();
            paramMap.put("id", Integer.parseInt(s));

            String result = HttpUtil.get("https://guide-oa-api.feihe.com/wisdom-public-tool/devopsaaaa/devops" +
                    "/digitalizeDealer/repairTrace", paramMap);

            log.info("id={},result={}", paramMap.get("id"), result);
        }

    }

}



